package com.ruoyi.collect.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采集任务对象 collect_task
 *
 * @author ruoyi
 * @date 2025-11-07
 */
public class CollectTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 任务ID */
    private Long taskId;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 站点ID */
    @Excel(name = "站点ID")
    private Long siteId;

    /** 站点名称 */
    @Excel(name = "站点名称")
    private String siteName;

    /** 站点URL */
    private String siteUrl;

    /** 站点标识 */
    @Excel(name = "站点标识")
    private String siteFlag;

    /** 采集类型(1=全量 2=今日 3=指定页 4=指定ID 5=关键词) */
    @Excel(name = "采集类型", readConverterExp = "1=全量,2=今日,3=指定页,4=指定ID,5=关键词")
    private String collectType;

    /** 任务类型 */
    private String taskType;

    /** 类型过滤 */
    private String typeFilter;

    /** 小时数 */
    private Integer hours;

    /** ID列表 */
    private String ids;

    /** 关键词 */
    private String keyword;

    /** 采集参数JSON(如:{\"page\":1,\"hours\":24,\"ids\":\"1,2,3\"}) */
    private String collectParams;

    /** 过滤配置 */
    private String filterConfig;

    /** 任务状态(0=待执行 1=执行中 2=已完成 3=失败 4=已取消) */
    @Excel(name = "任务状态", readConverterExp = "0=待执行,1=执行中,2=已完成,3=失败,4=已取消")
    private String taskStatus;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 执行时长(秒) */
    @Excel(name = "执行时长")
    private Integer duration;

    /** 当前页码 */
    private Integer currentPage;

    /** 总页数 */
    private Integer totalPages;

    /** 已采集数量 */
    private Integer collectedCount;

    /** 成功数量 */
    @Excel(name = "成功数量")
    private Integer successCount;

    /** 失败数量 */
    @Excel(name = "失败数量")
    private Integer failureCount;

    /** 进度 */
    private Integer progress;

    /** 错误信息 */
    private String errorMessage;

    /** 断点数据 */
    private String breakpointData;

    public void setTaskId(Long taskId)
    {
        this.taskId = taskId;
    }

    public Long getTaskId()
    {
        return taskId;
    }

    public void setTaskName(String taskName)
    {
        this.taskName = taskName;
    }

    public String getTaskName()
    {
        return taskName;
    }

    public void setSiteId(Long siteId)
    {
        this.siteId = siteId;
    }

    public Long getSiteId()
    {
        return siteId;
    }

    public void setSiteName(String siteName)
    {
        this.siteName = siteName;
    }

    public String getSiteName()
    {
        return siteName;
    }

    public void setSiteUrl(String siteUrl)
    {
        this.siteUrl = siteUrl;
    }

    public String getSiteUrl()
    {
        return siteUrl;
    }

    public void setSiteFlag(String siteFlag)
    {
        this.siteFlag = siteFlag;
    }

    public String getSiteFlag()
    {
        return siteFlag;
    }

    public void setCollectType(String collectType)
    {
        this.collectType = collectType;
    }

    public String getCollectType()
    {
        return collectType;
    }

    public void setTaskType(String taskType)
    {
        this.taskType = taskType;
    }

    public String getTaskType()
    {
        return taskType;
    }

    public void setTypeFilter(String typeFilter)
    {
        this.typeFilter = typeFilter;
    }

    public String getTypeFilter()
    {
        return typeFilter;
    }

    public void setHours(Integer hours)
    {
        this.hours = hours;
    }

    public Integer getHours()
    {
        return hours;
    }

    public void setIds(String ids)
    {
        this.ids = ids;
    }

    public String getIds()
    {
        return ids;
    }

    public void setKeyword(String keyword)
    {
        this.keyword = keyword;
    }

    public String getKeyword()
    {
        return keyword;
    }

    public void setCollectParams(String collectParams)
    {
        this.collectParams = collectParams;
    }

    public String getCollectParams()
    {
        return collectParams;
    }

    public void setFilterConfig(String filterConfig)
    {
        this.filterConfig = filterConfig;
    }

    public String getFilterConfig()
    {
        return filterConfig;
    }

    public void setTaskStatus(String taskStatus)
    {
        this.taskStatus = taskStatus;
    }

    public String getTaskStatus()
    {
        return taskStatus;
    }

    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }

    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }

    public void setDuration(Integer duration)
    {
        this.duration = duration;
    }

    public Integer getDuration()
    {
        return duration;
    }

    public void setCurrentPage(Integer currentPage)
    {
        this.currentPage = currentPage;
    }

    public Integer getCurrentPage()
    {
        return currentPage;
    }

    public void setTotalPages(Integer totalPages)
    {
        this.totalPages = totalPages;
    }

    public Integer getTotalPages()
    {
        return totalPages;
    }

    public void setCollectedCount(Integer collectedCount)
    {
        this.collectedCount = collectedCount;
    }

    public Integer getCollectedCount()
    {
        return collectedCount;
    }

    public void setSuccessCount(Integer successCount)
    {
        this.successCount = successCount;
    }

    public Integer getSuccessCount()
    {
        return successCount;
    }

    public void setFailureCount(Integer failureCount)
    {
        this.failureCount = failureCount;
    }

    public Integer getFailureCount()
    {
        return failureCount;
    }

    public void setProgress(Integer progress)
    {
        this.progress = progress;
    }

    public Integer getProgress()
    {
        return progress;
    }

    public void setErrorMessage(String errorMessage)
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage()
    {
        return errorMessage;
    }

    public void setBreakpointData(String breakpointData)
    {
        this.breakpointData = breakpointData;
    }

    public String getBreakpointData()
    {
        return breakpointData;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("taskId", getTaskId())
            .append("taskName", getTaskName())
            .append("siteId", getSiteId())
            .append("siteName", getSiteName())
            .append("siteUrl", getSiteUrl())
            .append("siteFlag", getSiteFlag())
            .append("taskType", getTaskType())
            .append("collectType", getCollectType())
            .append("typeFilter", getTypeFilter())
            .append("hours", getHours())
            .append("ids", getIds())
            .append("keyword", getKeyword())
            .append("collectParams", getCollectParams())
            .append("filterConfig", getFilterConfig())
            .append("taskStatus", getTaskStatus())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("duration", getDuration())
            .append("currentPage", getCurrentPage())
            .append("totalPages", getTotalPages())
            .append("collectedCount", getCollectedCount())
            .append("successCount", getSuccessCount())
            .append("failureCount", getFailureCount())
            .append("progress", getProgress())
            .append("errorMessage", getErrorMessage())
            .append("breakpointData", getBreakpointData())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}